<template>
	<view>
		<text v-for="(val,index) in userList" :key='index'  v-if="type=='text'">
			{{val.nickname}} <block v-if="index+1!=userList.length">,</block>
		</text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userList:[]
			};
		},
		props:{
			userIdList:{
				type:Array,
				default:()=>{}
			},
			type:{
				typ:String,
				default:'text'
			}
		},
		created() {
			this.userGet()
		},
		methods:{
			userGet(){
				this.userIdList.map(item => {
					if(item!=10000){
						this.$ajax(this.apiList.userGet,{
							userId:item
						}).then(res => {
							this.userList.push(res.data)
						});
					}
				})
			}
		}
		
	}
</script>

<style lang="scss">

</style>
